import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    // 首页
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('../views/About.vue')
  },
  {
    // 登录页面
    path: '/login',
    name: 'login',
    component: () => import('../views/login.vue')
  },
  {
    // 测试页面
    path: '/ceshi',
    name: 'ceshi',
    component: () => import('../views/ceshi.vue')
  },
  {
    // 分类页面
    path: '/fenlei',
    name: 'fenlei',
    component: () => import('../views/fenlei.vue')
  },
  {
    // 公告详情页面
    path: '/details_01',
    name: 'details_01',
    component: () => import('../views/details_01.vue')
  },
  {
    // 论文详情页面
    path: '/details_02',
    name: 'details_02',
    component: () => import('../views/details_02.vue')
  },
  {
    // 新增论文
    path: '/newpaper',
    name: 'newpaper',
    component: () => import('../views/newpaper.vue')
  },
  {
    // 我的论文 标题
    path: '/tables',
    name: 'tables',
    component: () => import('../views/tables.vue')
  },
  {
    // 我的论文 详细
    path: '/details_03',
    name: 'details_03',
    component: () => import('../views/details_03.vue')
  },
  {
    // 404
    path: '*',
    name: '404',
    component: () => import('../views/404.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
